<template>
  <div class="logout">
    <minDialogBox :dialogData="logoutData" @confirmBtnEvent="confirmBtnEvent" @cancelBtnEvent="cancelBtnEvent"></minDialogBox>
  </div>
</template>

<script>
export default {
  name: 'logout',
  data () {
    return {
      logoutData: {
        mainTips: [
          '确定退出登录吗？'
        ],
        btnList: [
          {
            name: '确定',
            color: 'blue',
            type: 'confirm'
          },
          {
            name: '取消',
            color: 'white',
            type: 'cancel'
          }
        ]
      }
    }
  },
  methods: {
    // 确认退出登录
    confirmBtnEvent () {
      this.$router.push('/Login')
      location.reload()
    },
    // 取消退出
    cancelBtnEvent () {
      this.$emit('cancelLogout')
    }
  }
}
</script>

<style scoped lang="scss">

</style>
